import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;


public class Arraylist {

    /**
     * @param args
     * @throws IOException 
     * @throws InterruptedException 
     */
    public static void main(String[] args) throws IOException, InterruptedException {
            // TODO Auto-generated method stub
//        String [] a1  = new String[5];
        String [] a2 = {"First Name", "Last Name", "Date of Birth", "Account Balance", "Gender"};
//        int j= 0;
//        List <String>l = new List<String>();
//        Arraylist <String []> a ;
        ArrayList<String[]> addresses = new ArrayList<String[]>();
        for(int i=0;i<3;i++){
            String [] a1  = new String[5];
            int j= 0;
            a1[j++] = String.valueOf(i);
            a1[j++] = String.valueOf(i);
            a1[j++] = String.valueOf(i);
            addresses.add(a1);
        }
        for(int i =0;i<addresses.size();i++){
            a2 = addresses.get(i);
            for(int j=0;j<a2.length;j++){
                System.out.println("a2["+j+"]\t"+a2[j]);
            }
        }
        
        for(int i=0;i<addresses.size();i++){
            addresses.get(i)[3]="abc";
            addresses.get(i)[4]="abc";
        }
        for(int i =0;i<addresses.size();i++){
            for(int j=0;j<addresses.get(i).length;j++){
                System.out.println("["+j+"]\t"+addresses.get(i)[j]);
            }
        }
        
//        addresses.add(a2);
//        a1 = addresses.get(0);
//        for (int j = 0;j<a1.length;j++){
//            System.out.println(a1[j].toString());
////            a1[j] = "";
//        }
        
        
    }

}
